package com.jk1123.us.datasource.derby;

import com.jk1123.us.core.ShortUrl;
import com.jk1123.us.core.UrlShortenerGenerator;
import com.jk1123.us.datasource.derby.util.DerbyLogUtil;
import lombok.extern.slf4j.Slf4j;



import java.sql.SQLException;
/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2021-09-15 00:44
 *
 */
@Slf4j
public class DerbyShortenerGenerator implements UrlShortenerGenerator {

    @Override
    public ShortUrl generate(String url) {
        return null;
    }

    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        DerbyLogUtil.removeLog();
        //测试 derby
        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
        System.out.println(1);
//        Connection connection = DriverManager.getConnection("jdbc:derby:D:\\derby\\us;user=derby_us;password=derby_us;create=true");
//
//        PreparedStatement preparedStatement = connection.prepareStatement("create table t_user(uuid varchar(32), name varchar(10), age int, address varchar(40))");
//
//        boolean execute = preparedStatement.execute();
//        System.out.println(execute);


    }
}
